/**
 * TriangularPrism assumes a isosceles triangular prism. 
 * 0.5 * width * height gives area of triangle
 * A method to calculate one side the triangle is included.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */

import java.util.*;
public class TriangularPrism extends Prism {
    //constructors
    public TriangularPrism(double w, double h, double d) {
        super.setWidth(w);
        super.setHeight(h);
        super.setDepth(d);
    }
    public TriangularPrism() {
        super.setWidth(0.0);
        super.setHeight(0.0);
        super.setDepth(0.0);
    }
    //mutators
    public double calcSide() {
        return Math.sqrt((super.getWidth() * super.getWidth()) + (super.getHeight() * super.getHeight()));
    }
    public double calcVolume() {
        return 0.5 * super.getWidth() * super.getHeight() * super.getDepth();
    }
    public double calcSurfaceArea() {
        return (super.getWidth() * super.getHeight()) + (2 * super.getDepth() * this.calcSide()) + (super.getDepth() * super.getWidth());
    }
}
